package com.inkyi.assistant.app.base;

import com.inkyi.framework.common.lang.Pair;
import com.inkyi.framework.common.utils.AssertHelper;

public class InitValue<E> extends Pair<Boolean, E> {

    public InitValue() {
        super(false, null);
    }

    public void initValue(E value) {
        AssertHelper.notNull(value);
        if (getKey()) {
            throw new RuntimeException("不能多次初始化");
        }
        setKey(true);
        setValue(value);
    }


}
